Various embodiments of the present disclosure relate to software development, and more specifically, to a method and system for identifying semantic differences between source code versions during software development.
With the increase of user demands, functions of computer software become increasingly complex. In the software development cycle, different source code versions in various development stages need to be tested frequently. Regression testing refers to retesting code after it has been modified so as to ensure that the modifications have not introduced new faults or caused other faults in the code. As an important part of software development, regression testing takes a large ratio of workload during the entire software development process. Generally speaking, developers gradually complete various functions in the software design and ensure the correctness of source code on the basis of regression testing.
For example, developers write a first source code version and find that through testing, the first source code version can achieve the expected design. Then, based on the first source code version, the developers continue to develop other functions and complete a second source version. During the subsequent development process of the second source code version, developers will add new code and modify existing code in the first source code version that has passed the regression test.
While testing the second source code version, it might be found that the second source code version has introduced new problems that do not exist in the first source code version. For example, the first source code version can pass the testing of some test cases, whereas the second source code version cannot pass the testing of these test cases. At this point, differences between the first source code version and the second source code version need to be compared to find and rule out faults that have been introduced during the second source code version development.